﻿using System;
using System.ComponentModel;
using System.Runtime.InteropServices;

namespace Teigha.Core
{
	public class OdGeSurfaceCurve2dTo3d : OdGeCurve3d
	{
		[EditorBrowsable(EditorBrowsableState.Never)]
		public OdGeSurfaceCurve2dTo3d(IntPtr cPtr, bool cMemoryOwn) : base(GlobalsPINVOKE.OdGeSurfaceCurve2dTo3d_SWIGUpcast(cPtr), cMemoryOwn)
		{
			this.swigCPtr = new HandleRef(this, cPtr);
		}

		[EditorBrowsable(EditorBrowsableState.Never)]
		public static HandleRef getCPtr(OdGeSurfaceCurve2dTo3d obj)
		{
			if (obj != null)
			{
				return obj.swigCPtr;
			}
			return new HandleRef(null, IntPtr.Zero);
		}

		~OdGeSurfaceCurve2dTo3d()
		{
			this.Dispose();
		}

		public override void Dispose()
		{
			if (this.swigCPtr.Handle != IntPtr.Zero)
			{
				if (this.swigCMemOwn)
				{
					lock (this.locker)
					{
						if (this.swigCPtr.Handle != IntPtr.Zero && this.swigCMemOwn)
						{
							this.swigCMemOwn = false;
							GlobalsPINVOKE.delete_OdGeSurfaceCurve2dTo3d(this.swigCPtr);
						}
					}
					this.swigCMemOwn = false;
				}
				this.swigCPtr = new HandleRef(null, IntPtr.Zero);
			}
			GC.SuppressFinalize(this);
			base.Dispose();
		}

		public OdGeSurfaceCurve2dTo3d() : this(GlobalsPINVOKE.new_OdGeSurfaceCurve2dTo3d__SWIG_0(), true)
		{
			if (GlobalsPINVOKE.SWIGPendingException.Pending)
			{
				throw GlobalsPINVOKE.SWIGPendingException.Retrieve();
			}
		}

		public OdGeSurfaceCurve2dTo3d(OdGeSurfaceCurve2dTo3d source) : this(GlobalsPINVOKE.new_OdGeSurfaceCurve2dTo3d__SWIG_1(OdGeSurfaceCurve2dTo3d.getCPtr(source)), true)
		{
			if (GlobalsPINVOKE.SWIGPendingException.Pending)
			{
				throw GlobalsPINVOKE.SWIGPendingException.Retrieve();
			}
		}

		public OdGeSurfaceCurve2dTo3d(OdGeCurve2d uvc, OdGeSurface surf) : this(GlobalsPINVOKE.new_OdGeSurfaceCurve2dTo3d__SWIG_2(OdGeCurve2d.getCPtr(uvc), OdGeSurface.getCPtr(surf)), true)
		{
			if (GlobalsPINVOKE.SWIGPendingException.Pending)
			{
				throw GlobalsPINVOKE.SWIGPendingException.Retrieve();
			}
		}

		public OdGeSurfaceCurve2dTo3d Assign(OdGeSurfaceCurve2dTo3d arc)
		{
			OdGeSurfaceCurve2dTo3d result = new OdGeSurfaceCurve2dTo3d(GlobalsPINVOKE.OdGeSurfaceCurve2dTo3d_Assign(this.swigCPtr, OdGeSurfaceCurve2dTo3d.getCPtr(arc)), false);
			if (GlobalsPINVOKE.SWIGPendingException.Pending)
			{
				throw GlobalsPINVOKE.SWIGPendingException.Retrieve();
			}
			return result;
		}

		public void getGeomExtents(OdGeExtents3d extents)
		{
			GlobalsPINVOKE.OdGeSurfaceCurve2dTo3d_getGeomExtents(this.swigCPtr, OdGeExtents3d.getCPtr(extents));
			if (GlobalsPINVOKE.SWIGPendingException.Pending)
			{
				throw GlobalsPINVOKE.SWIGPendingException.Retrieve();
			}
		}

		private object locker = new object();

		private HandleRef swigCPtr;
	}
}
